<?php
class Admin_Form_AddArticle extends Apps_Form {
	public function init() {

		$title = new Zend_Form_Element_Text(
				'title',
				array('label' 		=> 'Title',
	                  'required'     => true,
					  'class'		=> 'input-xxlarger'));
		$title->addFilter(new Zend_Filter_StringTrim());

		$multioptions = array(
		                      Model_DbTable_Article::TYPE_NOMAL		    => 'Normal',
		                      Model_DbTable_Article::TYPE_ABOUT		    => 'About us',
		                      Model_DbTable_Article::TYPE_SERVICE	    => 'Service',
		                      Model_DbTable_Article::TYPE_CAREER	    => 'Career',
		                      Model_DbTable_Article::TYPE_SYSTEM_SHOP	=> 'System shop'
		        );

		 $status = new Zend_Form_Element_Select(
	            'status',
	            array('label'        => 'Public ?',
	                  'required'     => true,
                      'multiOptions' => array(1 => 'Yes', 0 => 'No')
	            ));

		$type = new Zend_Form_Element_Select(
		        'type',
		        array('label' 		 => 'Article\'s type',
		                'required'	 => true,
		                'multiOptions' => $multioptions));


		$overview = new Zend_Form_Element_Textarea(
				'overview',
				array('label' 		=> 'Overview'));

		$detail = new Zend_Form_Element_Textarea(
				'detail',
				array('label' 		=> 'Detail'));

		$description = new Zend_Form_Element_Textarea(
				'description',
				array('label' => 'Description',
						'rows'	=> 1,
						'cols'	=> 80));

		$metaKeyWord = new Zend_Form_Element_Textarea(
		        'meta_keyword',
		        array('label' 		=> 'Meta Keyword',
		                'rows'	=> 5,
		                'cols'	=> 80));

		$metaDescription = new Zend_Form_Element_Textarea(
		        'meta_description',
		        array('label' 		=> 'Meta Description',
		                'rows'	=> 5,
		                'cols'	=> 80));
		$headerTitle = new Zend_Form_Element_Textarea(
		        'header_title',
		        array('label' 		=> 'Header Title',
		                'rows'	=> 5,
		                'cols'	=> 80));

		$this->addElement($title)
			 ->addElement($type)
			 ->addElement($status)
			 //->addElement($overview)
			 ->addElement($detail)
			 ->addElement($metaKeyWord)
			 ->addElement($metaDescription)
			 ->addElement($headerTitle)
			 ->addElement($description);

		$this->setLegend('Add new');
		$this->makeup();
	}
}